Skip to content

Conversation

@bigmark222
Copy link

…in Cargo.toml

Pull Request Template

Checklist

  • Confirmed that cargo run-checks command has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

  • Repro: git checkout v0.14.0 && rm Cargo.lock && cargo publish --dry-run -p burn-core fails with E0425 (bincode API change).

Changes

  • Pin bincode in burn-core to =2.0.0-rc.3 to prevent Cargo from resolving 2.0.1+, which removes decode_borrowed_from_slice and breaks publish/build when no lockfile is present.
  • Scope: 0.14.x line only; minimal change to restore publishability.

Testing

  • cargo run-checks
  • cargo publish --dry-run -p burn-core (succeeds with the exact pin)

Additional info just for clarity:

  • Cargo.lock isn’t used by library consumers; when downstream builds burn-core, Cargo re-resolves deps. Any lock in the repo is ignored.
  • cargo publish also re-resolves unless you force --locked. With the lock present it holds bincode at 2.0.0-rc.3, so the break is masked; without it, Cargo picks bincode 2.0.1 and build/publish fails.
  • The repro removes Cargo.lock to mirror the published experience: fresh resolution pulls bincode 2.0.1, which lacks decode_borrowed_from_slice, causing E0425.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking an older issue that was opened following the 0.16 release, which coincided with the bincode 2.0 official release: #2876

Is there a particular reason you are sticking to 0.14.0 instead of using more recent releases?

This comment also proposes a simple solution that doesn't require a new patch being pushed to crates.io: #2876 (comment). Simply pin the bincode version in your project.

@bigmark222
Copy link
Author

Thanks for the context and the link to #2876.

We’re still on 0.14.0 because our downstream crates are pinned to that release, and moving to 0.16+ is a larger migration we haven’t scheduled yet.

Pinning bincode in my own project doesn’t fix the publish issue in burn-core itself. When running cargo publish --dry-run -p burn-core (and for downstream crates), Cargo re-resolves dependencies without a lockfile and pulls in bincode 2.0.1, which then fails due to decode_borrowed_from_slice. That’s what motivated this PR for the 0.14.x line - to keep that release publishable until we can move to a newer Burn version.

If you’d prefer, I’m happy to switch this over to the API update (decode_from_slice) instead of the pin. Either approach on the 0.14 branch would unblock publishing.

@laggui
Copy link
Member

laggui commented Jan 5, 2026

Pinning is fine!

Pinning bincode in my own project doesn’t fix the publish issue in burn-core itself.

Ahhh yeah this is a fix in user-space (binary project), won't work for libs. Your users would have to apply this in their project.

Hopefully you can take advantage of the improvements in the latest releases soon! The upgrade is worth it. In the meantime, I'll try to trigger a patch publish for 0.14.1 later with the pinned rev.

@bigmark222
Copy link
Author

That makes sense. Thanks for the clarification, and for taking a look.

Agreed on the distinction; a user-space pin helps binaries, but doesn’t address library publishability, which is what prompted this PR on the 0.14.x line. A patch publish with the pinned rev would fully unblock that.

Appreciate you triggering a 0.14.1 patch release. We’ll plan the upgrade to newer Burn releases once our downstream crates are ready. Looking forward to taking advantage of the improvements there.

@laggui laggui merged commit 00af1a0 into tracel-ai:release/0.14 Jan 6, 2026
1 of 12 checks passed
@laggui
Copy link
Member

laggui commented Jan 6, 2026

@bigmark222 had to update some things in our tooling but just published a patch 0.14.1 for burn-core. All other crates remain at version 0.14.0. Just tested locally and burn correctly pulls the updated patch, there is no bincode build error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants